import { Injectable } from '@angular/core';

import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Global } from 'src/global';
import { User } from '../user/user';

@Injectable({
  providedIn: 'root'
})
export class LoginService {
  constructor(private http: HttpClient) { }

  url=Global.commonURL+"/login";
  login(user:User):Observable<any>{
    return this.http.post(this.url, {"user":user});
  }
}
